/////////////////////////////////////////////////////////////////////////////
// Name:        connections.cpp
// Purpose:     
// Author:      Stephen Whittle
// Modified by: 
// Created:     08/07/2009 14:24:17
// RCS-ID:      
// Copyright:   
// Licence:     
/////////////////////////////////////////////////////////////////////////////

// For compilers that support precompilation, includes "wx/wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
#pragma hdrstop
#endif

#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif

////@begin includes
////@end includes

#include "connections.h"

////@begin XPM images
////@end XPM images


/*
 * Connections type definition
 */

IMPLEMENT_DYNAMIC_CLASS( Connections, wxDialog )


/*
 * Connections event table definition
 */

BEGIN_EVENT_TABLE( Connections, wxDialog )

////@begin Connections event table entries
////@end Connections event table entries

END_EVENT_TABLE()


/*
 * Connections constructors
 */

Connections::Connections()
{
    Init();
}

Connections::Connections( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    Init();
    Create(parent, id, caption, pos, size, style);
}


/*
 * Connections creator
 */

bool Connections::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin Connections creation
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    wxDialog::Create( parent, id, caption, pos, size, style );

    CreateControls();
    if (GetSizer())
    {
        GetSizer()->SetSizeHints(this);
    }
    Centre();
////@end Connections creation
    return true;
}


/*
 * Connections destructor
 */

Connections::~Connections()
{
////@begin Connections destruction
////@end Connections destruction
}


/*
 * Member initialisation
 */

void Connections::Init()
{
////@begin Connections member initialisation
////@end Connections member initialisation
}


/*
 * Control creation for Connections
 */

void Connections::CreateControls()
{    
////@begin Connections content construction
    Connections* itemDialog1 = this;

    wxFlexGridSizer* itemFlexGridSizer2 = new wxFlexGridSizer(0, 2, 0, 0);
    itemDialog1->SetSizer(itemFlexGridSizer2);

    wxArrayString itemListBox3Strings;
    wxListBox* itemListBox3 = new wxListBox( itemDialog1, ID_LISTBOX2, wxDefaultPosition, wxDefaultSize, itemListBox3Strings, wxLB_SINGLE );
    itemFlexGridSizer2->Add(itemListBox3, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer4 = new wxFlexGridSizer(0, 2, 0, 0);
    itemFlexGridSizer2->Add(itemFlexGridSizer4, 0, wxGROW|wxGROW|wxALL, 5);

    wxStaticText* itemStaticText5 = new wxStaticText( itemDialog1, wxID_STATIC, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer4->Add(itemStaticText5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxTextCtrl* itemTextCtrl6 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL5, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer4->Add(itemTextCtrl6, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText7 = new wxStaticText( itemDialog1, wxID_STATIC, _("Server"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer4->Add(itemStaticText7, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxTextCtrl* itemTextCtrl8 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL6, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer4->Add(itemTextCtrl8, 0, wxGROW|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxStaticText* itemStaticText9 = new wxStaticText( itemDialog1, wxID_STATIC, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer4->Add(itemStaticText9, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxTextCtrl* itemTextCtrl10 = new wxTextCtrl( itemDialog1, ID_TEXTCTRL7, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer4->Add(itemTextCtrl10, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer11 = new wxFlexGridSizer(0, 1, 0, 0);
    itemFlexGridSizer4->Add(itemFlexGridSizer11, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton12 = new wxButton( itemDialog1, ID_BUTTON2, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer11->Add(itemButton12, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton13 = new wxButton( itemDialog1, ID_BUTTON3, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer11->Add(itemButton13, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemFlexGridSizer4->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    itemFlexGridSizer4->Add(5, 5, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxFlexGridSizer* itemFlexGridSizer16 = new wxFlexGridSizer(0, 3, 0, 0);
    itemFlexGridSizer4->Add(itemFlexGridSizer16, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton17 = new wxButton( itemDialog1, ID_BUTTON6, _("Connect"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer16->Add(itemButton17, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton18 = new wxButton( itemDialog1, ID_BUTTON7, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer16->Add(itemButton18, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

    wxButton* itemButton19 = new wxButton( itemDialog1, ID_BUTTON8, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
    itemFlexGridSizer16->Add(itemButton19, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5);

////@end Connections content construction
}


/*
 * Should we show tooltips?
 */

bool Connections::ShowToolTips()
{
    return true;
}

/*
 * Get bitmap resources
 */

wxBitmap Connections::GetBitmapResource( const wxString& name )
{
    // Bitmap retrieval
////@begin Connections bitmap retrieval
    wxUnusedVar(name);
    return wxNullBitmap;
////@end Connections bitmap retrieval
}

/*
 * Get icon resources
 */

wxIcon Connections::GetIconResource( const wxString& name )
{
    // Icon retrieval
////@begin Connections icon retrieval
    wxUnusedVar(name);
    return wxNullIcon;
////@end Connections icon retrieval
}
